473,837 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

gcc "ld: cannot perform PE operations on non PE output file"

I tried to compile a program to a elf shared library for a Linux
platform on a windows machine with the command:
gcc -o Prog.so -shared -Wl,--oformat -Wl,elf32-i386
however this results in
ld: cannot perform PE operations on non PE output file
When compiling to PE format no errors are generated, which leads me to
believe that some post processing operations are being preformed.
This error message does not help me figure what PE operations are being
performed, because I have explicitly told it to output elf format
output.
How can I correct this problem?

Nov 14 '06 #1
2 6946
On 13 Nov 2006 20:44:27 -0800, Re**********@gm ail.com wrote in
comp.lang.c++:
I tried to compile a program to a elf shared library for a Linux
platform on a windows machine with the command:
gcc -o Prog.so -shared -Wl,--oformat -Wl,elf32-i386
however this results in
ld: cannot perform PE operations on non PE output file
When compiling to PE format no errors are generated, which leads me to
believe that some post processing operations are being preformed.
This error message does not help me figure what PE operations are being
performed, because I have explicitly told it to output elf format
output.
How can I correct this problem?
By posting to a group that supports your particular compiler, like an
embedded Linux group. Your questions is not about the C++ language at
all, but about a particular linker, and linkers are not defined by the
language.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.l earn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 14 '06 #2

Jack Klein wrote:
On 13 Nov 2006 20:44:27 -0800, Re**********@gm ail.com wrote in
comp.lang.c++:
[...]
>
By posting to a group that supports your particular compiler, like an
embedded Linux group. Your questions is not about the C++ language at
all, but about a particular linker, and linkers are not defined by the
language.
[...]
Discussion moved to gnu.gcc .help.

Nov 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1676
by: niku | last post by:
Hello all. I'm trying to get mysql installed on OpenBSD 3.4. Unfortunately, it appeares that the port only installes the mysql-client, and one needs to install the -server package seperately. This would be fine with one exception, there is a dependency that breaks when installing from ports. This lead me to install from source, and now I'm having problems just getting mysql to start. If anyone could look at the error message below, and...
10
3733
by: mike | last post by:
regards: I use Jtidy (api) to translate a HTML file into a "XHTML file". But The "XHTML file" cannot be identified by nokia 6600. Do I miss something important? Or this is Jtidy's weakness or bug? Can someone excellent to tell me the reason. best wishes
9
715
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit anyway).... Private Sub LogChange(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs) If e.ChangeType = WatcherChangeTypes.Created Then
2
2595
by: Mark | last post by:
Visual C# .Net Standard 7.1.3088 I'm trying to change the type of application from a windows to a console app. I go into the project properties --> Application --> According to the help, I should have: Assembly Name Output Type Default Namespace Startup Project etc etc.
11
41098
by: Kimmo Laine | last post by:
I'm flipping my wig here, people. I'm using classes and making each class a file. when I'm including dependet classess, I use require_once to avoid multiple declarations - yet they happen. I put debug_print_backtrace in the file to see how it is included, and here's the output: #0 require_once() called at #1 require_once(\eKirje.textGrid.class.php) called at #0 require_once() called at #1 require_once(\eKirje.kanava.class.php)...
5
1997
by: Chris Robb | last post by:
I'm having some really odd behavior with a PHP script. I have it populating an HTML select form with a for loop. When I try the years 2006 to 1900. I get the following error: PHP Warning: Cannot modify header information - headers already sent by (output started at /Users/chrobb/Sites/city-directory/controlBar.php:54) in /Users/chrobb/Sites/city-directory/controlBar.php on line 88 I've done a fair amount of searching and it looks...
1
4683
by: juergen | last post by:
Hi, there are many postings on this subject, I have read them put don't have an answer. I get these warnings: Cannot send session cookie - headers already sent in, but my php-scripts are okay. As you can see in the code and response below, I really don't output anything. I am at EVANZO.
1
3323
by: hicham | last post by:
Hi; I am getting a very annoying linker error ( though the binary is generated correctly ) when compiling my code as follow: * I am compiling my code on AIX 5.3. * I compile with xlc_r -c * I link with xlc_r -o * And the compiler version is 8 xlc enterprise The error/warning is:
3
8800
blazedaces
by: blazedaces | last post by:
Hello, it's been a while since I posted on these forums. My issue I think isn't as much in my code as it's in the syntax and structure in references other packages. I'll get straight to it then: There's a package called "randomX" which, while I don't know if you care to know, has a program that accesses a site called hotbits to produce true random numbers based on radioactive decay. You can look it up if you're any interested. Anyway,...
0
9685
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10886
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10580
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10277
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9413
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4479
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4052
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3126
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.