Problem when compiling: second C linkage of overloaded func

Problems compiling? Don't understand the source code? Don't know how to code your feature? Post here.

Moderator: Moderators

Locked
tkaarud
Posts: 2
Joined: 2003-01-15 17:54

Problem when compiling: second C linkage of overloaded func

Post by tkaarud » 2003-01-15 18:01

Hello, I have the following problem.

I have installed the latest SDK, the correct wtl and stl. The compile.txt is also read.


Compiling...
stdinc.cpp
e:\kildekode\dc++\stlport\stl\_threads.h(116) : error C2733: second C linkage of overloaded function 'InterlockedIncrement' not allowed
e:\kildekode\dc++\stlport\stl\_threads.h(116) : see declaration of 'InterlockedIncrement'
e:\kildekode\dc++\stlport\stl\_threads.h(117) : error C2733: second C linkage of overloaded function 'InterlockedDecrement' not allowed
e:\kildekode\dc++\stlport\stl\_threads.h(117) : see declaration of 'InterlockedDecrement'
e:\kildekode\dc++\stlport\stl\_threads.h(118) : error C2733: second C linkage of overloaded function 'InterlockedExchange' not allowed
e:\kildekode\dc++\stlport\stl\_threads.h(118) : see declaration of 'InterlockedExchange'
Error executing cl.exe.

If I omit lines 116-118 I get this:

Compiling...
stdafx.cpp
e:\kildekode\dc++\wtl\atlframe.h(274) : error C2146: syntax error : missing ';' before identifier 'lpnm'
e:\kildekode\dc++\wtl\atlframe.h(905) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<TBase,TWinTraits>' being compiled
e:\kildekode\dc++\wtl\atlframe.h(274) : error C2501: 'LPNMREBARCHEVRON' : missing storage-class or type specifiers
e:\kildekode\dc++\wtl\atlframe.h(905) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<TBase,TWinTraits>' being compiled
e:\kildekode\dc++\wtl\atlframe.h(274) : error C2501: 'lpnm' : missing storage-class or type specifiers
e:\kildekode\dc++\wtl\atlframe.h(905) : see reference to class template instantiation 'WTL::CFrameWindowImplBase<TBase,TWinTraits>' being compiled
e:\kildekode\dc++\windows\stdafx.cpp(24) : error C2856: #pragma hdrstop cannot be inside an #if block
Error executing cl.exe.


Anyone got an idea?

OLDoMiNiON
Posts: 202
Joined: 2003-01-06 06:22
Location: Salford, England.
Contact:

Post by OLDoMiNiON » 2003-01-20 08:24

i get the same...

OLDoMiNiON
Posts: 202
Joined: 2003-01-06 06:22
Location: Salford, England.
Contact:

Post by OLDoMiNiON » 2003-01-20 08:36

well, it's pretty obviously an sdk error...

i'm updating now.. i'll see what happens :)

Tubal
Posts: 4
Joined: 2003-01-18 08:26

Post by Tubal » 2003-01-20 17:48

I get the same but I'm not so sure it's an sdk error. I have the newest version and the file it complains about is an stl-file. I don't know what to do about it though.
Help?

OLDoMiNiON
Posts: 202
Joined: 2003-01-06 06:22
Location: Salford, England.
Contact:

Post by OLDoMiNiON » 2003-01-21 06:36

oh yeh, stupid me! lol

anyone have any ideas?

tkaarud
Posts: 2
Joined: 2003-01-15 17:54

Post by tkaarud » 2003-01-26 04:19

Problem solved for me by just installing the (same) SDK again and register it.

Tubal
Posts: 4
Joined: 2003-01-18 08:26

Post by Tubal » 2003-01-27 14:01

A lot of people say it works after they re-install the SDK, but it doesn't seem to work for me though. How do you register it?

Maia
Posts: 2
Joined: 2003-02-07 07:47

Post by Maia » 2003-02-07 07:58

Tubal wrote:A lot of people say it works after they re-install the SDK, but it doesn't seem to work for me though. How do you register it?
Simply going into your
Start menù --> Programs --> Microsoft Platform SDK --> Visual Studio Registration --> Register PSDK Directories with Visual Studio

That's all :wink:

korsch
Posts: 2
Joined: 2003-02-02 17:05

Post by korsch » 2003-02-07 18:39

Well you were right. That solved the problem. Thx.

cherrio
Posts: 28
Joined: 2003-02-17 09:02

Post by cherrio » 2003-02-17 16:09

I am having the exact same problem (http://dcplusplus.sourceforge.net/forum ... .php?t=980). I have tried everything suggested, but still get 3 errors,

error C2733: second C linkage of overloaded function 'InterlockedIncrement' not allowed
d:\share\dc++\stlport\stl\_threads.h(116) : see declaration of 'InterlockedIncrement'

I have installed SDK twice, I have registered it (well I click on the icon and the mouse goes 'busy' for a sec then back to normal, is this what suppose to happen?)

Any one have any other suggestions?

TIA,
Robert

sarf
Posts: 382
Joined: 2003-01-24 05:43
Location: Sweden
Contact:

Post by sarf » 2003-02-18 04:52

Make sure that the STLport is highest in the list, ABOVE the WTL.
Make sure that the WTL is DIRECTLY below the STLport.
Make sure that the SDK directory is DIRECTLY below the WTL.

Thus, the lis should look like this:
STLport
WTL
SDK
<Some other stuff>

Sarf
---
I love work. I can just sit and look at it for hours.

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-04-10 22:41

phrentec wrote:is there a link to download the SDK?
http://www.microsoft.com/msdownload/pla ... k-full.htm

I think that's Mozilla friendly, although they want you to be running IE to get to the general "download Platform SDK" page... Wheee!!

Locked