Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332384 - how to define links to libraries like semaphore.h or mat.h
Summary: how to define links to libraries like semaphore.h or mat.h
Status: CLOSED INVALID
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: cdt-build-inbox@eclipse.org CLA
QA Contact: Andrew Gvozdev CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-11 22:32 EST by xtremelu CLA
Modified: 2010-12-11 23:54 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xtremelu CLA 2010-12-11 22:32:01 EST
Build Identifier: M20100211-1343

I'm using libraries semaphore.c and math.c which requires some arguments to link them on compilation time, using terminal works like:

bash$ gcc -o name name.c -lm -pthread -lrt

I need to set that options (-lm -pthread -lrt) when building the binary file from eclipse, otherwise I get errors informing that the fuctions which belongs to those libraries are undefined, and I can't run my program from eclipse.

I want to compile, say build binary, passing that options to gcc, in order to build links to those libraries.

BR.
LP

Reproducible: Always

Steps to Reproduce:
1.#include <math.h>
  #include <semaphore.h>
2.try to use pow() or sem_wait()
3.try to build binary
Comment 1 Andrew Gvozdev CLA 2010-12-11 23:54:16 EST
Please, use bugzilla for reporting bugs only. For questions use user forums http://www.eclipse.org/forums/ and select CDT. You are more likely to get help there anyway. We do not do user support here.