472,984 Members | 2,063 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,984 software developers and data experts.

precompiled header problems

Hi,

I am working on a dll that exports COM interfaces, and i am having some
troubles with the use of precompiled headers.
the project compiles always, but if i use /Yu (default: use precompiled
header) i get linker error:

OPCServer.exp : warning LNK4070: /OUT:OPCServer.dll directive in .EXP
differs from output filename '.\Debug/CIT_OPC_Server.dll'; ignoring
directive
OPCServer.obj : error LNK2001: unresolved external symbol
_CLSID_CITOPCServer

I can build without problems if i use /Yx (automatically create precompiled
headers) (strange) or
if i don't use precompiled headers at all.

the problem probably lies in the main cpp file:

#define INITGUID // WITHOUT THIS WE WON'T SEE CLSID_CITOPCServer
#include "stdafx.h"
#include "_OPCServer_.h"
#include "OPCDEFS.h"
#include "GlobalDef.h"
#include "process.h"
#include "opc10.h"

it looks as if #define INITGUID is not visible anymore by the code that is
_OPCServer_.h, because if i compile without precompiled headers, and i
comment that define away, i get the same linker error.
i have tried switching the lines #define INITGUID and #include "stdafx.h"
but that didn't help.
does anyone know the cause of this strange behavior?

kind regards,
Bruno.

Nov 16 '05 #1
0 1140

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Asfand Yar Qazi | last post by:
Hi, Now that GCC 3.4 has precompiled headers, I'm thinking I can stop using pimpls to speed up development time, as it may make life easier (declaring pimpls takes a long time...) What are...
1
by: JoeS | last post by:
Is there anyway to share a single pch file between projects in VC 7.0? I have 300+ projects each of which creates its own pch. All projects include the exact same header files in the precompiled...
4
by: Andrew Ward | last post by:
Hi All, I was wondering if it is possible to use precompiled headers without having to include a <stdafx.h> or whatever in every source file. My problem is that I have a project that makes heavy...
2
by: Tommy Vercetti | last post by:
I am working on a Managed C++ project and I get the following error: TestThread.cpp(3) : error C2859: c:\projects\ProjectName\debug\vc70.pdb is not the pdb file that was used when this...
0
by: citizenkahn | last post by:
I read an article entitled "Sharing precompiled headers between projects" on this group. I am in the same situation as the requesting author, but the solution has not worked for me. Here is my...
2
by: Lloyd Dupont | last post by:
I'm using VS.NET 2005 beta 2. I have problem compiling project (it says: 'cannot find file StdAfx.h" which is right in the middle of my project). The 1st time I create a new project and it fixes...
3
by: Kevin Frey | last post by:
I am working on a test migration of our project to Visual Studio 2005 Beta 2 as a precursor to the availability of the full release of VS2005. The most onerous problem so far concerns the...
0
by: simon.hudon | last post by:
Hi everyone, I have a strange problem with precompiled headers with VC8. I have the problem while trying to use a precompiled header to build another precompiled header. I tried the sample...
8
by: Abubakar | last post by:
Hi, I am writing some unmanaged c++ code that would need to be compiled in the future using compilers other than vc++. I'm using the feature of vc++ "use precompiled headers", is there going to...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.