-anthrax-

hi guys,

I have a VC++ project which i have downloaded as a sample code which was originally written in VC++ 7.1. I'm using the evaluation copy of Visual Studio 2005 professional, whchi is still on evaluation perioud.

there was no problems in converting it in to VC++ 8 (2005) and also when running in debugging mode. it works perfectly fine.

as soon as i run it in relese mode it gives me series of errors saying "fatal error C1083: Cannot open include file ...." and shows the names of the header files.

In the project the header files are organized to sub folders. when i direct the include function to the sub directory (eg: #include "camera\cameracontroller.h") it compiles fine and comes up with a link error.

could somebody help me understanding what is going on here, and how can i run this in relese mode.



Re: Visual C++ General fatal error C1083: on relese only

Sheng Jiang (?ęÉ)

I think you need to add additional include and lib paths to the release conficuration of the project. See Walkthrough: Creating and Using a Static Library for step by step instructions.






Re: Visual C++ General fatal error C1083: on relese only

-anthrax-

still couldn't managed to get it running in relese mode. anyway thanks for your comment.

is it possible to direct compiler to use different header file locations in debug mode and relese mode





Re: Visual C++ General fatal error C1083: on relese only

Jonathan Caves - MSFT

Yes: this is definitely possible (though not always desireable especially with header files). I would check that your include path is identical in debug and release mode.






Re: Visual C++ General fatal error C1083: on relese only

-anthrax-

this may sounds like stupid.

but all i know about including header directories is to set the path from tools> options> Projects and solutions> VC++ directories> Include files.

and to add the include files to the project by Project> Add existing Item and select the required header file.

could you please tell me how to set the header directories specificaly for debug mode and relese mode.





Re: Visual C++ General fatal error C1083: on relese only

alex.m

From the menu bar:
Project-> <Project name> Properties... (last option)
or
Context menu (right mouse button) over the project in the solution explorer

Once the dialog is open

Configuration properties->C/C++->General
You can modify there your include paths for a specific configuration

You can also do something similar for the linker path.


Hope this helps





Re: Visual C++ General fatal error C1083: on relese only

-anthrax-

thanx, it compiled. but gives the same set of link errors which i have mentioned from the main question.

CameraControl.obj : error LNK2019: unresolved external symbol __imp__EdsRelease@4 referenced in function "public: static unsigned long __stdcall CameraEventListener::handleObjectEvent(unsigned long,struct __EdsObject *,void *)" ( handleObjectEvent@CameraEventListener@@SGKKPAU__EdsObject@@PAX@Z)

when i tried to compile by changing the include statement with the sub directory name, exactly the same thing happen.

and also it gives the same warning

warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

does that make any sence





Re: Visual C++ General fatal error C1083: on relese only

Pintu Shukla


See this is a Linking Error and it occur when you forget to incude necessasory .lib file .Just include all the corresponding .lib file and it will work proper for you.

Thanx





Re: Visual C++ General fatal error C1083: on relese only

alex.m

As told, check the linker settings.

HINT: Switch between debug and release to quickly detect missmatches in the additional libraries (linker dependencies).

The warning is ok, it just suggests you to change the code for using strcpy_s instead of strcpy, and it also shows you a way for disabling these kind of checkings. If you're new to c/c++, remember that a warning is not an error.





Re: Visual C++ General fatal error C1083: on relese only

-anthrax-

exellent. i cant believe i've been that stupid. thanks a millon.