Compiling C++

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Apr 2009
Posts: 5
Reputation: jomacho is an unknown quantity at this point 
Solved Threads: 0
jomacho jomacho is offline Offline
Newbie Poster

Compiling C++

 
0
  #1
Apr 15th, 2009
Hi, this is my first post here. The fact is i'm not a programmer and i need help. I have a software that i need to solve a vehicle routing problem for my thesis. But i only got the source code for it, one header file and 6 cpp files. I have tried compiling this with no success, the error messages mean nothing to me, maybe i'm missing something, files to compile on win32, i don't know. If any of you guys are willing to help, i would be gladly apreciated (should be no problem for a programmer).
Need this for win32 console.

http://rapidshare.com/files/221788134/sdvrp.zip

Regards,

Jorge
Last edited by jomacho; Apr 15th, 2009 at 6:06 pm.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 376
Reputation: Clockowl is on a distinguished road 
Solved Threads: 27
Clockowl's Avatar
Clockowl Clockowl is offline Offline
Posting Whiz

Re: Compiling C++

 
0
  #2
Apr 15th, 2009
It doesn't compile in MinGW's GCC. Looks like MSVC code?

I'm getting these errors:
  1. =|
  2. sdvrp.h|18|warning: ignoring #pragma warning |
  3. sdvrp.h|222|warning: no newline at end of file|
  4. genius.cpp||In function `double genius(route*&, Nb&)':|
  5. genius.cpp|732|warning: comparison between signed and unsigned integer expressions|
  6. genius.cpp|733|warning: comparison between signed and unsigned integer expressions|
  7. genius.cpp|736|error: no matching function for call to `std::vector<node*, std::allocator<node*> >::erase(node**)'|
  8. vector.tcc|108|note: candidates are: typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >) [with _Tp = node*, _Alloc = std::allocator<node*>]|
  9. vector.tcc|120|note: typename std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::erase(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, __gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >) [with _Tp = node*, _Alloc = std::allocator<node*>]|
  10. ||=== Build finished: 1 errors, 4 warnings ===|

Maybe someone else can compile it tho.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: jomacho is an unknown quantity at this point 
Solved Threads: 0
jomacho jomacho is offline Offline
Newbie Poster

Re: Compiling C++

 
0
  #3
Apr 17th, 2009
Thank you for trying clockowl. Is there anything wrong with the code, or needs to be compiled with another software? Please help. I really need this.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 376
Reputation: Clockowl is on a distinguished road 
Solved Threads: 27
Clockowl's Avatar
Clockowl Clockowl is offline Offline
Posting Whiz

Re: Compiling C++

 
0
  #4
Apr 17th, 2009
Erm. I guess it can be compile in MSVC++. You can try to install MSVC++ Express and grab the platform SDK. Google is your friend. Can anybody else compile this code?
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: Compiling C++

 
0
  #5
Apr 19th, 2009
It's just compiling fine with me (it gives a lot of warnings), I'm using the Borland Compiler ...

Edit:: Using the Microsoft C++ compiler (from Visual C++ 2008 Express Edition) I'm also getting this error ...
Last edited by tux4life; Apr 19th, 2009 at 8:44 am.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: Compiling C++

 
0
  #6
Apr 19th, 2009
You can get the Borland Compiler for free from here ...

I compiled it by running the following command inside the directory of the source files:
bcc32 -etabu_sdvrp *.cpp
Last edited by tux4life; Apr 19th, 2009 at 9:28 am.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: Compiling C++

 
0
  #7
Apr 19th, 2009
I tested this program and can confirm it works, but try running it with the wrong number of arguments (1 instead of 2) directly causes the program to crash, it's very 'crash-sensitive' ...

The program is also using 'old C++' code, for example old file handling using the FILE-pointer, etc. ...

So let's say: This program can be improved
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 1,968
Reputation: tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute tux4life has a reputation beyond repute 
Solved Threads: 214
tux4life's Avatar
tux4life tux4life is offline Offline
Posting Virtuoso

Re: Compiling C++

 
0
  #8
Apr 19th, 2009
I've attached the compiled file to this post ...
Enjoy it !!

tux4life
Last edited by tux4life; Apr 19th, 2009 at 11:25 am.
Attached Files
File Type: zip tabu_sdvrp.zip (74.0 KB, 1 views)
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: jomacho is an unknown quantity at this point 
Solved Threads: 0
jomacho jomacho is offline Offline
Newbie Poster

Re: Compiling C++

 
0
  #9
Apr 19th, 2009
Thanks a lot tux4life. You're a life savior. It's normal the code not being optimized, this is only used for operational research, mainly for mathematicians, not programmers. Once again, thanks buddy.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 5
Reputation: jomacho is an unknown quantity at this point 
Solved Threads: 0
jomacho jomacho is offline Offline
Newbie Poster

Re: Compiling C++

 
0
  #10
Apr 20th, 2009
Sorry to bother again, but how can i see the list of available arguments? I don't understand the meaning of the seed of random numbers. How do i use it?
tabu_sdvrp.exe input.cri (random number)?
It crashes this way.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC