problem with compiling 64 bt dll on a 32 bit windows via TDM-GCC Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!GCC compiling a dll with __stdcallEmbedding DLLs in a compiled executableHow can I test a Windows DLL file to determine if it is 32 bit or 64 bit?Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?Windows 7, 64 bit, DLL problemsProblems with DLLsUsing MinGW-Builds to compile a 32-bit exe on a 64-bit system — compiles a 32-bit exe but links against 64-bit DLLsDifferences between Mingw-w64 and TDM-GCC for a simple GDI projectWin32 32-bit process loads 64-bit kernel32.dllCompile C in windows: TDM vs MinGW

By what mechanism was the 2017 UK General Election called?

How to make an animal which can only breed for a certain number of generations?

Does a random sequence of vectors span a Hilbert space?

Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?

Russian equivalents of おしゃれは足元から (Every good outfit starts with the shoes)

.bashrc alias for a command with fixed second parameter

latest version of QGIS fails to edit attribute table of GeoJSON file

One-one communication

What is the proper term for etching or digging of wall to hide conduit of cables

Any stored/leased 737s that could substitute for grounded MAXs?

How does the body cool itself in a stillsuit?

The Nth Gryphon Number

Is there a verb for listening stealthily?

The test team as an enemy of development? And how can this be avoided?

newbie Q : How to read an output file in one command line

Baking rewards as operations

As a dual citizen, my US passport will expire one day after traveling to the US. Will this work?

Pointing to problems without suggesting solutions

Why are current probes so expensive?

Why not use the yoke to control yaw, as well as pitch and roll?

Why can't fire hurt Daenerys but it did to Jon Snow in season 1?

How could a hydrazine and N2O4 cloud (or it's reactants) show up in weather radar?

Statistical analysis applied to methods coming out of Machine Learning

What criticisms of Wittgenstein's philosophy of language have been offered?



problem with compiling 64 bt dll on a 32 bit windows via TDM-GCC



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Data science time! April 2019 and salary with experience
The Ask Question Wizard is Live!GCC compiling a dll with __stdcallEmbedding DLLs in a compiled executableHow can I test a Windows DLL file to determine if it is 32 bit or 64 bit?Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?Windows 7, 64 bit, DLL problemsProblems with DLLsUsing MinGW-Builds to compile a 32-bit exe on a 64-bit system — compiles a 32-bit exe but links against 64-bit DLLsDifferences between Mingw-w64 and TDM-GCC for a simple GDI projectWin32 32-bit process loads 64-bit kernel32.dllCompile C in windows: TDM vs MinGW



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








-1















I use 32 bit windows and my assistant has 64 bit. We both use gcc (I specifically use tdm-gcc. My assistant uses qt which also uses gcc as far as I'm aware). I wanted to write a very simple plugin in a form of simple .dll for my assistant to use from inside of her application. To do so I need just to compile my .dll for windows 32 (like 32 bit XP) as a .dll for a windows 64 (like win 7 or 10).



I found that -m64 option could work. However when I compile it and she links it and tries to call my functions it shows that this application with this plugin .dll I've made (on 32 bit windows with tdm-gcc with that -m64 option) silently crashes (program ends and no output is generated).



What is the problem with that? The test we were doing was simple like exporting a function that just returns 232323 and trying to receive and print it on application side - but is still doesn't work.My guess is that this 64 bit .dll is wrong (dependency walker shows dependency on kernel32, isn't it 32 bit specific?)



Should I do something more than putting -m64 to make my plugin compile to 64 bit and work properly there?










share|improve this question






























    -1















    I use 32 bit windows and my assistant has 64 bit. We both use gcc (I specifically use tdm-gcc. My assistant uses qt which also uses gcc as far as I'm aware). I wanted to write a very simple plugin in a form of simple .dll for my assistant to use from inside of her application. To do so I need just to compile my .dll for windows 32 (like 32 bit XP) as a .dll for a windows 64 (like win 7 or 10).



    I found that -m64 option could work. However when I compile it and she links it and tries to call my functions it shows that this application with this plugin .dll I've made (on 32 bit windows with tdm-gcc with that -m64 option) silently crashes (program ends and no output is generated).



    What is the problem with that? The test we were doing was simple like exporting a function that just returns 232323 and trying to receive and print it on application side - but is still doesn't work.My guess is that this 64 bit .dll is wrong (dependency walker shows dependency on kernel32, isn't it 32 bit specific?)



    Should I do something more than putting -m64 to make my plugin compile to 64 bit and work properly there?










    share|improve this question


























      -1












      -1








      -1








      I use 32 bit windows and my assistant has 64 bit. We both use gcc (I specifically use tdm-gcc. My assistant uses qt which also uses gcc as far as I'm aware). I wanted to write a very simple plugin in a form of simple .dll for my assistant to use from inside of her application. To do so I need just to compile my .dll for windows 32 (like 32 bit XP) as a .dll for a windows 64 (like win 7 or 10).



      I found that -m64 option could work. However when I compile it and she links it and tries to call my functions it shows that this application with this plugin .dll I've made (on 32 bit windows with tdm-gcc with that -m64 option) silently crashes (program ends and no output is generated).



      What is the problem with that? The test we were doing was simple like exporting a function that just returns 232323 and trying to receive and print it on application side - but is still doesn't work.My guess is that this 64 bit .dll is wrong (dependency walker shows dependency on kernel32, isn't it 32 bit specific?)



      Should I do something more than putting -m64 to make my plugin compile to 64 bit and work properly there?










      share|improve this question
















      I use 32 bit windows and my assistant has 64 bit. We both use gcc (I specifically use tdm-gcc. My assistant uses qt which also uses gcc as far as I'm aware). I wanted to write a very simple plugin in a form of simple .dll for my assistant to use from inside of her application. To do so I need just to compile my .dll for windows 32 (like 32 bit XP) as a .dll for a windows 64 (like win 7 or 10).



      I found that -m64 option could work. However when I compile it and she links it and tries to call my functions it shows that this application with this plugin .dll I've made (on 32 bit windows with tdm-gcc with that -m64 option) silently crashes (program ends and no output is generated).



      What is the problem with that? The test we were doing was simple like exporting a function that just returns 232323 and trying to receive and print it on application side - but is still doesn't work.My guess is that this 64 bit .dll is wrong (dependency walker shows dependency on kernel32, isn't it 32 bit specific?)



      Should I do something more than putting -m64 to make my plugin compile to 64 bit and work properly there?







      windows gcc dll 32bit-64bit tdm-mingw






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 4:16









      Spevacus

      536




      536










      asked Mar 9 at 0:37









      J. StoneJ. Stone

      217




      217






















          1 Answer
          1






          active

          oldest

          votes


















          0














          It showed it most probably work.. She cant link it in QT from unknown reasons to me (we work remotely and i cannot check) but she succesfully linked it dynamically so it seems -m64 in fact suffice






          share|improve this answer























          • Did you produce separate import libraries for the two architectures? Just because the list of exported functions is the same doesn't make the import library interchangeable. Or are you not using import libraries at all and trusting the gcc linker to analyze the DLL exports?

            – Ben Voigt
            Mar 26 at 20:37











          • Ben Voigt - i didnt generated import libs, gcc generally dont need that -llibname and he just links..... this is a problem of my girl assistant and QT i dont know what it was.... i only was in confusion if that -m64 should work at all , it now showed it work when dynamically linked.. so my doubts are answered

            – J. Stone
            Mar 28 at 13:49











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55072848%2fproblem-with-compiling-64-bt-dll-on-a-32-bit-windows-via-tdm-gcc%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          It showed it most probably work.. She cant link it in QT from unknown reasons to me (we work remotely and i cannot check) but she succesfully linked it dynamically so it seems -m64 in fact suffice






          share|improve this answer























          • Did you produce separate import libraries for the two architectures? Just because the list of exported functions is the same doesn't make the import library interchangeable. Or are you not using import libraries at all and trusting the gcc linker to analyze the DLL exports?

            – Ben Voigt
            Mar 26 at 20:37











          • Ben Voigt - i didnt generated import libs, gcc generally dont need that -llibname and he just links..... this is a problem of my girl assistant and QT i dont know what it was.... i only was in confusion if that -m64 should work at all , it now showed it work when dynamically linked.. so my doubts are answered

            – J. Stone
            Mar 28 at 13:49















          0














          It showed it most probably work.. She cant link it in QT from unknown reasons to me (we work remotely and i cannot check) but she succesfully linked it dynamically so it seems -m64 in fact suffice






          share|improve this answer























          • Did you produce separate import libraries for the two architectures? Just because the list of exported functions is the same doesn't make the import library interchangeable. Or are you not using import libraries at all and trusting the gcc linker to analyze the DLL exports?

            – Ben Voigt
            Mar 26 at 20:37











          • Ben Voigt - i didnt generated import libs, gcc generally dont need that -llibname and he just links..... this is a problem of my girl assistant and QT i dont know what it was.... i only was in confusion if that -m64 should work at all , it now showed it work when dynamically linked.. so my doubts are answered

            – J. Stone
            Mar 28 at 13:49













          0












          0








          0







          It showed it most probably work.. She cant link it in QT from unknown reasons to me (we work remotely and i cannot check) but she succesfully linked it dynamically so it seems -m64 in fact suffice






          share|improve this answer













          It showed it most probably work.. She cant link it in QT from unknown reasons to me (we work remotely and i cannot check) but she succesfully linked it dynamically so it seems -m64 in fact suffice







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 26 at 20:32









          J. StoneJ. Stone

          217




          217












          • Did you produce separate import libraries for the two architectures? Just because the list of exported functions is the same doesn't make the import library interchangeable. Or are you not using import libraries at all and trusting the gcc linker to analyze the DLL exports?

            – Ben Voigt
            Mar 26 at 20:37











          • Ben Voigt - i didnt generated import libs, gcc generally dont need that -llibname and he just links..... this is a problem of my girl assistant and QT i dont know what it was.... i only was in confusion if that -m64 should work at all , it now showed it work when dynamically linked.. so my doubts are answered

            – J. Stone
            Mar 28 at 13:49

















          • Did you produce separate import libraries for the two architectures? Just because the list of exported functions is the same doesn't make the import library interchangeable. Or are you not using import libraries at all and trusting the gcc linker to analyze the DLL exports?

            – Ben Voigt
            Mar 26 at 20:37











          • Ben Voigt - i didnt generated import libs, gcc generally dont need that -llibname and he just links..... this is a problem of my girl assistant and QT i dont know what it was.... i only was in confusion if that -m64 should work at all , it now showed it work when dynamically linked.. so my doubts are answered

            – J. Stone
            Mar 28 at 13:49
















          Did you produce separate import libraries for the two architectures? Just because the list of exported functions is the same doesn't make the import library interchangeable. Or are you not using import libraries at all and trusting the gcc linker to analyze the DLL exports?

          – Ben Voigt
          Mar 26 at 20:37





          Did you produce separate import libraries for the two architectures? Just because the list of exported functions is the same doesn't make the import library interchangeable. Or are you not using import libraries at all and trusting the gcc linker to analyze the DLL exports?

          – Ben Voigt
          Mar 26 at 20:37













          Ben Voigt - i didnt generated import libs, gcc generally dont need that -llibname and he just links..... this is a problem of my girl assistant and QT i dont know what it was.... i only was in confusion if that -m64 should work at all , it now showed it work when dynamically linked.. so my doubts are answered

          – J. Stone
          Mar 28 at 13:49





          Ben Voigt - i didnt generated import libs, gcc generally dont need that -llibname and he just links..... this is a problem of my girl assistant and QT i dont know what it was.... i only was in confusion if that -m64 should work at all , it now showed it work when dynamically linked.. so my doubts are answered

          – J. Stone
          Mar 28 at 13:49



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55072848%2fproblem-with-compiling-64-bt-dll-on-a-32-bit-windows-via-tdm-gcc%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          1928 у кіно

          Захаров Федір Захарович

          Ель Греко