Error Undefined Reference To Direct3dcreate9
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up undefined reference to Direct3DCreate9@4' up vote 0 down vote favorite I have a problem with Code::Blocks (version 13.12) with TDM-GCC compiler (version 4.7.1, 32 bit) and DirectX SDK june_2010. I managed to link these DirectX libraries with my project somehow, at least it's not showing cannot find -ld3dx9 anymore. Now I get undefined reference to Direct3DCreate9@4' and it shows undefined reference to every Matrix function. Is this wrong/incompatible DX library linking related issue with codeblocks? I googled many sites with people having the same issues, but these solutions didn't help me. I remember last year when I worked with DX I had similar problems and I was able to solve them, but now I can't find anything. Is it possible that Code::Blocks and its compiler version changes caused this? Most of solutions I found : use #pragma comment and link in project->build options. As I told, I did both of these things and no luck. Thank you. c++ directx undefined-reference share|improve this question asked Mar 26 '15 at 20:39 Jancis 427 What library are you using? The one from ms sdk or the one provided by the gcc compiler? –γηράσκω δ' αεί πολλά διδασκόμε Mar 27 '15 at 4:55 If you mean what DirectX library then the one from MS DirectX SDK. –Jancis Mar 27 '15 at 5:50 I had the same problem with the mingw lib files. I manualy linked the two files d3d9 and d3dx9: project->build options->linker Settings->Add and then browse to the files. I firstly removed the d3d9 and d3dx9 lib files that came with the compiler (keep them as back up). –γηράσκω δ' αεί πολλά διδασκόμε Mar 27 '15 at 14:59 Nope... I did what you told me, but i
Google Yandex ... @myxasa 14 / 14 / 1 : 31.05.2012 : 210 : 2 13.05.2013, 20:04 G++ undefined reference to `Direct3DCreate9@4'" #1 .. ... G++ ! undefined reference to `Direct3DCreate9@4'" . ? C++1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 http://stackoverflow.com/questions/29288405/undefined-reference-to-direct3dcreate94 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 http://www.cyberforum.ru/cpp-beginners/thread863853.html 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 // include the basic windows header files and the Direct3D header file #include
Forum Visual C++ & C++ Programming Graphics Programming simple directx program does not compile - newbie question http://forums.codeguru.com/showthread.php?488198-simple-directx-program-does-not-compile-newbie-question If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register or Login before you can post: https://answers.yahoo.com/question/?qid=20070512021906AASwBOh click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 4 of error undefined 4 Thread: simple directx program does not compile - newbie question Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode November 14th, 2009,05:51 PM #1 ant-1 View Profile View Forum Posts Junior Member Join Date Nov 2009 Posts 2 simple directx program does error undefined reference not compile - newbie question First of all, hi everyone, as this is my first post. I'm having a problem getting some DirectX code to compile. I'm using latest version of NetBeans, and MinGW. The error is "undefined reference to `Direct3DCreate9@4'", so I assume it's a problem with not linking to the right libraries. However, I have used "#pragma comment (lib, "d3d9.lib")", so I'm not sure why that's not working. I'm sure you get loads of questions like this all the time, I've seen a lot of threads like this on Google (none of them contained an answer which helped me much though). Sorry for being dumb, thanks in advance for any help. Anyway, here's the code: Code: // include the basic windows header files and the Direct3D header file #include
Help Suggestions Send Feedback Answers Home All Categories Arts & Humanities Beauty & Style Business & Finance Cars & Transportation Computers & Internet Consumer Electronics Dining Out Education & Reference Entertainment & Music Environment Family & Relationships Food & Drink Games & Recreation Health Home & Garden Local Businesses News & Events Pets Politics & Government Pregnancy & Parenting Science & Mathematics Social Science Society & Culture Sports Travel Yahoo Products International Argentina Australia Brazil Canada France Germany India Indonesia Italy Malaysia Mexico New Zealand Philippines Quebec Singapore Taiwan Hong Kong Spain Thailand UK & Ireland Vietnam Espanol About About Answers Community Guidelines Leaderboard Knowledge Partners Points & Levels Blog Safety Tips Computers & Internet Programming & Design Next Dev c++ direct x [linker error] undefined reference to 'Direct3DCreate9@4'? i got the DirectXSDK from devpack.org with is the write one for devc++ i include this files which i was told to do on some forum but it didn't fix any thing #include