Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC6 VC7 VC7.1 VC8.0 Win32 MFC VC9.0 , +
Hi all,
 
I got very well solution for my problem of executing win32 Project via Command Prompt but problem goes really hard when i deal .h files.
 
My previous useful post
Executing Win32 application via CL command[^]
 
For feedback on above post i really Thanks Richard MacCutchan[^] and CPallini[^] both of them.
 
Question Arised:-
 
I have Win32 API with 3 .cpp file and 2 .h(header files)
 
My int main() function has function call AddTwoNumber()
Which member function of ManupulateValue Class
Now
When i trown command like
cl main.cpp
then i got linking error
Unresolved external symbol AddTwoNumber()
 
Then I trown command like
cl main.cpp ManupulateValue.cpp
main compile successfully but while compiling ManupulateValue.cpp i got again liking error
UnResolve symbol GetRamdom()
GetRamdom() is Member of GetValue.h header file.
 
Now My question:-
How i link .h file to my compile process so that .h file can also get include.
Posted 16-Sep-11 23:37pm
Edited 16-Sep-11 23:42pm
v2
Comments
CPallini at 17-Sep-11 9:00am
   
Why do you have a function definition inside a header file?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please stop reposting the same question; I have already answered this here[^]. If you really do not understand how compiling and linking works then read this section[^] on MSDN.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 105
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 17 Sep 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100