Link error 0.301

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

Moderator: Moderators

Locked
ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Link error 0.301

Post by ganntrade » 2003-10-29 15:46

Hi

Im getting these linker error:

Linking...
UCPage.obj : error LNK2001: unresolved external symbol "private: static class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > * ResourceManager::strings" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@A)
UploadPage.obj : error LNK2001: unresolved external symbol "private: static class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > * ResourceManager::strings" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@A)
UsersFrame.obj : error LNK2001: unresolved external symbol "private: static class _STL::basic_string<char,class _STL::char_traits<char>,class _STL::allocator<char> > * ResourceManager::strings" ([email protected]@@[email protected][email protected]@[email protected]@[email protected]@[email protected]@[email protected]@A)
.
.
.
.

How can i fix this?

Im using VC7 2002

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 00:45

Include ResourceManager.cpp and ResourceManager.h to your project.

ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 03:03

Thx

That helped alot but now im getting this error

d:\xx\xxxxxxx\DCPP0301\client\ResourceManager.cpp(63) : fatal error C1010: unexpected end of file while looking for precompiled header directive

How do i correct this?

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 03:09

Try to clean the project, then rebuild it.

ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 03:15

I have done that and it didnt help.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 03:28

Rightclick on ResourceManager.cpp ( inside VC7 ofcource), choose properties->C/C++->Precompiled Headers and try the different options for "Create/Use Precompiled Header" and see if it helps.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 03:39

The properties should look like this:
Image
Switched page storing the image, should work now.
Last edited by joakim_tosteberg on 2003-11-01 03:15, edited 2 times in total.

ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 06:28

No that didnt funktion :(

I have tried all settings possible.

your picture doesnt work its just a big red X.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 06:48


ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 07:09

Cant see the picture.
It says that I dont have permission to view that page.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 07:11

Ok, I will check the prefences of the page.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 07:16

Looks like you must sign in with eighter hotmail.com or msn.com to be able to acess the page. I will se if I can past and copy the image here directly.

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 07:22

Ok, looks like I can't paste a image here directly, I´ll taki like this instead:

___________________________________________________________

Create/Use Precompiled Header: Use Precompiled Header (/Yu)
Create/Use PCH Through File: stdinc.h
Precompiled Header File: $(IntDir)/client.pch

____________________________________________________________

Does this help?

ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 08:12

Here we go

Ok but now i got a nother error

d:\MyPath\DCPlusPlus0301\client\ResourceManager.cpp(19) : error 2859: d:\MyPath\dcplusplus0301\vc7\debug\windows\vc70.pdb is not the pdb file that was used when this precompiled header was created, recreate the precompiled header.

How do i fix this?

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 08:34

clean and rebuild?

ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 08:38

Yes offcourse i did that :)

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 08:44

delete the whole vc7 direcoty in d:\MyPath\dcplusplus0301 this is only temporary file generated by the compiler during build. And it looks like they are outdated.

ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 08:54

No that didnt help :((

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-30 09:27

Are you using the dcplusplus.dsw or the dcplusplus.sln to open the project?

ganntrade
Posts: 13
Joined: 2003-04-04 04:32

Post by ganntrade » 2003-10-30 11:07

Im using dcplusplus.sln

liny
Posts: 30
Joined: 2003-11-01 09:18

Post by liny » 2003-11-01 09:23

. Ensure DON'T Include ResourceManager.cpp and ResourceManager.h to your 'DcPlusPlus' project, keep everything unchanged.

. Right click 'DcPlusPlus' in Solution Explorer
. Select 'Project Dependencies'
. Check 'bzip2' , 'client', 'zlib'
. Click 'OK'
. Press 'F7'
. Build succeeded

Locked