User forums > Help

Problems with resource path includes in VS2005 in simple program

<< < (2/2)

stahta01:

--- Code: ---/LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\atlmfc\lib\"

--- End code ---

Likely wrong above; try removing the final "\".


--- Code: ---/LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\VC\atlmfc\lib"

--- End code ---

Also, rename your targets to not have a space in them if they did have one.

Tim S.

DCKelley:

--- Quote ---Likely wrong above; try removing the final "\".
--- End quote ---
That did it, many thanks, now running, now to deal with the 'missing' debugger issues....

stahta01:
The links below are just a guess on what is needed.

http://msdn.microsoft.com/en-us/library/ff539058%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/windows/hardware/gg462988

DCKelley:
Yes, those are the right starting points (I think).  This debugger issue is a real pain, the stock MS install will not work for me (a Win 7 machine with the normal "un-pure" mix of 32 and 64 bit bits and parts). The ISO installer will quickly abort, while the smaller one will simply take much more time to do it, they seem to check for different things on start up.   That issue in and of itself may cause me to unwrap the VS2010 sitting here (as I am told that they integrated this revision of the debugger in that release).   

As of today, I can get the same simple console programs to work On Window using both GCC and the native cl tools - all very good.  And the also Unbuntu side works wells as well.   I was able to bring a huge console program with tons of graphics (produced by the tool Chart Director which is OS independent) over and get that running right away. 

Now the issue is to better control the source a bit with well chosen #ifdef pre-processor call so we can keep the same code base in two places.    Is there a help section or documentation somewhere that might address what #define would be of value when Code::Base was invoked on each environment.  I am thinking I can mix these with some OS and and environment defines and get what I need to keep a common code base. 

Alpha:
If I understand you correctly, you are asking how to have Code::Blocks send a define (-DMyPlatform) for your code to pick up and (de)activate the correct sections.

I think you will find variable expansion and scripting commands useful.

What I would do is place the following line in the project build options #defines tab.

--- Code: ---[[if(PLATFORM == PLATFORM_MSW){print("Windows");}else if(PLATFORM == PLATFORM_GTK){print("GTK");}else if(PLATFORM == PLATFORM_MAC){print("Mac");}else if(PLATFORM == PLATFORM_OS2){print("OS2");}else if(PLATFORM == PLATFORM_X11){print("X11");}]]

--- End code ---
It will evaluate to one of the strings in the print functions, which will be what is defined upon compilation.

Or the simpler method of using

--- Code: ---Platform[[print(PLATFORM);]]

--- End code ---
in the #defines tab; picking up the resulting define possibilities of Platform0, Platform1, Platform2, ...

Navigation

[0] Message Index

[*] Previous page

Go to full version