• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

A simple guide to compiling the DLL

Is it possible to compile the source files when they are in a different folder than the makefile and project? If it is simple to do then I would like to keep the source files in a separate folder from the project and makefile.

If that is not simple to do... would it be easy if I kept the makefile with the source files but had the project in a different folder?
 
Is it possible to compile the source files when they are in a different folder than the makefile and project? If it is simple to do then I would like to keep the source files in a separate folder from the project and makefile.

If that is not simple to do... would it be easy if I kept the makefile with the source files but had the project in a different folder?

It's definitely possible. I'm curious though, why do you want to do it?

You can alter the makefile to point to the location of the source files. It will require relative directory path commands. I think VS2010 lets you leave project files in different folders instead of copying them into a working directory. Should be an option/prompt when you create the project.
 
It's definitely possible. I'm curious though, why do you want to do it?

You can alter the makefile to point to the location of the source files. It will require relative directory path commands. I think VS2010 lets you leave project files in different folders instead of copying them into a working directory. Should be an option/prompt when you create the project.

I am using VS2010 so that is good to know.

As for why - I plan on creating a sourceforge project and using SVN to keep track of my code changes. I don't want the project and all the extra files it generates to be included in the sourceforge/SVN stuff, so I thought it would be best if the project was in a different folder than the source files.
 
I am using VS2010 so that is good to know.

As for why - I plan on creating a sourceforge project and using SVN to keep track of my code changes. I don't want the project and all the extra files it generates to be included in the sourceforge/SVN stuff, so I thought it would be best if the project was in a different folder than the source files.

Hmm. I think you can do that a better way. With SVN and definitely with Bzr it should be possible to only version some of the files in a folder; say *.c and *.h. That way you can keep the whole thing together (which the makefile and visual studio like) while only versioning the source and not the *.o or project files (which SVN likes since it reduces the size of commits).
 
Hi Asaf. :)

I am working on BAT again and I keep running into this error:

Code:
    106    IntelliSense: PCH warning: line directives cannot be used in a PCH.  An intellisense PCH file was not generated.    c:\firaxis games\sid meier's civilization 4\beyond the sword\cvgamecoredll\boost-1.32.0\include\boost\python\call.hpp    44    4

Any ideas? I seem to be getting one for each .hpp file. I'm using VS2010 Pro. It's always worked before... :crazyeye:
 
@UncleOwen - Sorry for the long wait. I didn't have time yet to take a look at your DLL. I hope I'll find the time in a few weeks. Post a reminder here from time to time if it's still relevant.

@Red Key - When using source control, developers usually keep the project files and makefiles with the source code files in the source control. The idea is that you can checkout a working copy and with minimal additions successfully build the project. What you shouldn't check in are the user files (*.user, *.suo) and intellisense files (in VS2010 - *.sdf, *.opensdf), and anything that is built from the files (*.obj, *.lib), but these are usually in a subfolder.

@LM - As far as I can see, it might only affect intellisense performance. I'm assuming your DLL is created? If so, you can usually hide intellisense errors using by turning the "error reporting" property off in the relevant options page.
Let me know if it's enough or if you want me to investigate it further.
 
@LM - As far as I can see, it might only affect intellisense performance. I'm assuming your DLL is created? If so, you can usually hide intellisense errors using by turning the "error reporting" property off in the relevant options page.
Let me know if it's enough or if you want me to investigate it further.
I seem to have fixed this one, though I'm not sure how. Now, I'm just fighting with the effing Boost libraries - AGAIN. :wallbash:

It's sort of "Now you see me, now you don't" with those stupid things, and no matter how many times I do this, I lose at least a day getting this @&%$ figured out. I'm using Danny Demonic's makefile. All of this has worked fine before, but it will.not.compile. [pissed]

I've even had to resort to editing the vcproj file manually to fix what should be read from the makefile. What am I doing wrong? :confused:
 
:dunno: post the makefile and proj
I'm sorry I was cross earlier. Here are the files:
View attachment ProjectFiles.zip

No matter what I do, I can't see the Boost files, I get arbitrary errors in intellisense, and it will not compile with any amount of coaxing.

I'm at a total loss. I must mention that everything is a fresh install as my original development machine was smashed to pieces during a recent move. :(
 
First, I assume these are correct?
Code:
TOOLKIT=C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003
PSDK=E:\WindowsSDK
CIVINSTALL=C:\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword

Second, you can ignore the intellisense errors (just hide them the way I posted earlier). Can you post the rest of the errors? The actual compilation errors?
 
I used an earlier version before, now switching to this
So just to make it sure:
If you have extra c++ and header files among the source files, you simply add those into the projectfile?
The makefile adds them automatically, right?
Also, it doesn't really matters, whether I compile the CvTextScreens file or not, correct?

EDIT: Also, with your files, I don't need the Boost-1.32.0 and Python24 folders from Beyond the Sword\CvGameCoreDLL\, right?
(if the CIVINSTALL route is set correctly in the makefile)
 
First, I assume these are correct?
Code:
TOOLKIT=C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003
PSDK=E:\WindowsSDK
CIVINSTALL=C:\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword
Second, you can ignore the intellisense errors (just hide them the way I posted earlier). Can you post the rest of the errors? The actual compilation errors?
Hi Asaf.

First of all, here is the proper makefile. (I sent the wrong one at first, sorry) And the errors. I've got it from 6339 errors down to 9, so I'm doing something right. :lol:

View attachment errors.zip

Of the nine I still have left, only the PCH errors are a concern. The others are something borked in my code, and I'll have to fix those myself. My makefile comes from Better BAT AI, which I know compiles properly.

Thanks.

EDIT:

I have it fixed.
 
having a problem, needed a debug dll for my mod and I put the source files and stuff into the folder, the environment said the project was out of date so I looked and saw it was replaced by the mods project files (old) so put in the right project (basically redid from stratch), when I try to build the solution I just get this:

1>------ Build started: Project: CvGameCoreDLL, Configuration: Release Win32 ------
1>Performing Makefile project actions
1> COPY "Release\CvGameCoreDLL.dll" "C:\Program Files\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\Mods\New Leader\Assets\."
1>Access is denied.
1> 0 file(s) copied.
1>Build log was saved at "file://c:\Users\User\DLL Compilation\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

but in the Debug folder there is no new dll... whats the problem?
 
After you've selected a configuration, Simply go to the 'Build' menu and choose 'Build Solution' (or press F7). This will start the compilation process. If there are modified source files, this will save them first.

Decided to try this out, and I did everything as you said but when I did that, I got errors.
Spoiler :

1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Users\kyle\Desktop\CvGameCoreDLL\Debug\BuildLog.htm"
1>CvGameCoreDLL - 1 error(s), 103 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Thats just the bottom since the whole thing would be to long
 
Back
Top Bottom