Author Topic: Installing the ACE Threads package on C::B  (Read 21491 times)

Tom_E

  • Guest
Installing the ACE Threads package on C::B
« on: January 05, 2006, 04:43:32 pm »
Hello.

I am a Computer Science student and have just recently discovered the wonderful C::B IDE.
being the said (read "sad"  :) ) student, i recieved and assignment that requires working
with the ACE (Description) package.

I work with the MinGW compiler since all our code is checked on Linux systems and i dont have Linux installed at home. Now, I have made C::B work with MinGW, that was easy even for me, but I couldnt get the ACE package to work.

If any C++ expert can take a look at the site and explain how to get it to work on C::B  or anyone has experience working with the package and can explain, I would be very greatful.

thanks in advance.


Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Installing the ACE Threads package on C::B
« Reply #1 on: January 05, 2006, 04:56:29 pm »
Wow, I just tried to build this beast. Now I know why you said "sad" ;)
Given the fact it comes with a .DSW file, I thought "why, it can't be so hard", and dragged that onto Code::Blocks...

5 minutes later, it was still loading when my machine ran out of virtual memory...

Stand by, I'll try on ;)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Installing the ACE Threads package on C::B
« Reply #2 on: January 05, 2006, 05:22:02 pm »
Ok, next step, I tried MSYS with ./configure and make.

After running for a while, it failed and showed the message "Please use the stock ACE build procedure detailed in the file 'ACE-INSTALL.html'.

And Io and behold, there is a section on how to build that package with MSYS and MinGW :)

So, you have to download the MSYS package (in case you don't have that yet), and follow the instructions in the ACE-INSTALL.html document. I haven't tried those because it is a bit lenghty, but I guess  you will get along with that :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Tom_E

  • Guest
Re: Installing the ACE Threads package on C::B
« Reply #3 on: January 05, 2006, 05:39:01 pm »
alright, i'll try that. thanks.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Installing the ACE Threads package on C::B
« Reply #4 on: January 05, 2006, 06:34:27 pm »
If I remember correctly, there is ACE package for DEV-C++. I have no tried it yet, but may be it would be possible to import it in C::B and use it. I think it would be worth a try.

Michael
 

Tom_E

  • Guest
Re: Installing the ACE Threads package on C::B
« Reply #5 on: January 09, 2006, 10:58:38 pm »
here's an update:

I've successfully built the DLL and ".a" file the install page says i had to build, i've written a small code and compiled it. It compiled fine, no syntax or code errors, but i got an error that has something to do with Linking.

it said:
"#error You must link against multi-threaded libraries when using ACE (check your project settings)"

i've scanned extensivly though C::B options and did not find anything regarding MultiThreading in the GNU GCC compiler switches. BUT i have found these exact switches in the MS VC toolkit compiler options.

now i dont even have that installed, and i have no idea what to tell the MinGW maker so it wont use MultiThreading.

any ideas?
 

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Installing the ACE Threads package on C::B
« Reply #6 on: January 09, 2006, 11:15:32 pm »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Tom_E

  • Guest
Re: Installing the ACE Threads package on C::B
« Reply #7 on: January 09, 2006, 11:38:44 pm »
looks good! i'm testing it now with more code. thanks for the help!

lawina

  • Guest
Re: Installing the ACE Threads package on C::B
« Reply #8 on: January 15, 2006, 03:54:28 am »
There is a ACE package in devpak format at
http://sourceforge.net/project/showfiles.php?group_id=94270
I didn't  test it though.

mtk

  • Guest
Re: Installing the ACE Threads package on C::B
« Reply #9 on: January 15, 2006, 08:32:38 am »
Hello fellow Tom...
I've tried Installing the ACE_DevPack, and recieved a size error while downloading.
I tried to manually download the Pack & install, it seems OK.

but compiling projects still doesn't work.

Any compiler options that I shouls change?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Installing the ACE Threads package on C::B
« Reply #10 on: January 15, 2006, 05:56:27 pm »
but compiling projects still doesn't work.

Any compiler options that I shouls change?

Hello,

it would be good if you can give some info about your C::B version and the problems you have had.

Michael

mtk

  • Guest
Re: Installing the ACE Threads package on C::B
« Reply #11 on: January 17, 2006, 12:53:10 pm »
The C::B version is:1.0rc2

the problem is that compiling this:
Code
#include "ace/OS.h"
#include "ace/Task.h"
#include <iostream>
#include <string>

int main()
{
std::cout << "Hello world!" << std::endl;
return 0;
}

returned the attached errors.

[attachment deleted by admin]

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Installing the ACE Threads package on C::B
« Reply #12 on: January 17, 2006, 01:50:18 pm »
Hello,

Having a look at your errors, I have remarked that:

  • You must link against multi-threaded libraries when using ACE. Thomas has given a link above. Did you try it?
  • Some of your header files are not found (i.e., No such file or directory). This generates errors (of course). Did you correctly include the path of the included files (Project-->Build options-->Directories-->Compiler)?

Best wishes,
Michael

PS.: I would also suggest you to use the latest nightly build instead of RC2. Or compile the latest SVN revision by yourself (easy and worth).

mtk

  • Guest
Re: Installing the ACE Threads package on C::B
« Reply #13 on: January 17, 2006, 01:54:37 pm »
Sorry didn't see thomas' remarks...
where exactly do I have to add this option?

About the included files, I didn't add them because I used the pack, so I assumed this is done for me...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Installing the ACE Threads package on C::B
« Reply #14 on: January 17, 2006, 02:03:14 pm »
Sorry didn't see thomas' remarks...
where exactly do I have to add this option?

Try to "other compiler options".

About the included files, I didn't add them because I used the pack, so I assumed this is done for me...

Even if you just use already compiled libraries, you should always add the header files. Normally, they are stored into an include directory.

Michael