Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Default ‘Shared Library’ configuration gives build error: no -fPIC
Default ‘Shared Library’ configuration gives build error: no -fPIC [message #206662] Fri, 14 December 2007 07:28 Go to next message
Eclipse UserFriend
Originally posted by: 4cs6fcg02.sneakemail.com

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig580653D5760BA664F5A5EBB3
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hello,

creating a new test project set to build a shared library, gives a
linker error at first build (you have to put some .c file in it as well,
of course), which suggests to add -fPIC. I have to manually add this to
the compiler options to get things right. Is this a bug?

(
Suse 10.3, 64-bit

Eclipse SDK
Version: 3.3.1.1
Build id: M20071023-1652

Eclipse C/C++ Development Tools
Version: 4.0.2.200711280800
Build id: 200711280800
)

Cheers, H.
--=20
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html


--------------enig580653D5760BA664F5A5EBB3
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHYnbWe+7xMGD3itQRAvceAJ96hLuZ7sjivhLOYzKCywtYz9oKEgCd FdUC
Zat6rJGkTrr62SmuonKhGkA=
=JE1G
-----END PGP SIGNATURE-----

--------------enig580653D5760BA664F5A5EBB3--
Re: Default ‘Shared Library’ configuration gives build error: no -fPIC [message #206670 is a reply to message #206662] Fri, 14 December 2007 11:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dmsubs.NOSPAM.consertum.com

I don't think it is a bug. CDT is generic and your example will be specific to
your tool/environment. For example, my tools don't require -fPIC.

--
Derek


Hendrik Maryns wrote:
> Hello,
>
> creating a new test project set to build a shared library, gives a
> linker error at first build (you have to put some .c file in it as well,
> of course), which suggests to add -fPIC. I have to manually add this to
> the compiler options to get things right. Is this a bug?
>
> (
> Suse 10.3, 64-bit
>
> Eclipse SDK
> Version: 3.3.1.1
> Build id: M20071023-1652
>
> Eclipse C/C++ Development Tools
> Version: 4.0.2.200711280800
> Build id: 200711280800
> )
>
> Cheers, H.
Re: Default ‘Shared Library’ configuration gives build error: no -fPIC [message #206798 is a reply to message #206670] Mon, 17 December 2007 07:18 Go to previous message
Eclipse UserFriend
Originally posted by: 4cs6fcg02.sneakemail.com

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig53D55FBB7D865660BAE8D2E7
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Derek Morris schreef:
> I don't think it is a bug. CDT is generic and your example will be
> specific to your tool/environment. For example, my tools don't require
> -fPIC.

Hm, ok. I think -fPIC is only needed on Linux. But Eclipse does know
that I=E2=80=99m on Linux, right. Or maybe this is just needed with GCC.=
Hell,
I start to understand why I=E2=80=99ve been using Java until now.

Thanks, H.
--=20
Hendrik Maryns
http://tcl.sfs.uni-tuebingen.de/~hendrik/
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
http://aouw.org
Ask smart questions, get good answers:
http://www.catb.org/~esr/faqs/smart-questions.html


--------------enig53D55FBB7D865660BAE8D2E7
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHZmkUe+7xMGD3itQRAgQEAJ4pAUsEuXKwiPYV1Kk7KhYnbMGR9QCf daow
F7TLaUuY5CQNBgDmH5mJ63A=
=Sx6/
-----END PGP SIGNATURE-----

--------------enig53D55FBB7D865660BAE8D2E7--
Previous Topic:No source available for ptmalloc_init()?
Next Topic:error messages ordering
Goto Forum:
  


Current Time: Thu May 01 23:34:37 EDT 2025

Powered by FUDForum. Page generated in 0.02738 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top