tdm-gcc's mingw32-gcc throws 'missing argument' error

849 Views Asked by At

i've been trying to compile a dll project with TDM_GCC myself (without any IDE) i entered first command in powershell (after assigning right value to $Env:Path) like below:

mingw32-gcc.exe -Wall -DBUILD_DLL -g  -c .\IntLib.c -o .\IntLib.o

i go well with first chunk but second one always throws error like below:

PS D:\C_Dll\dllsrc> mingw32-gcc.exe -shared -Wl,--output-def=libIntLib.def -Wl,--out-implib,libIntLib.a -Wl,--dll  IntLi
b.o  -o IntLib.dll  -luser32
At line:1 char:28
+ mingw32-gcc.exe -shared -Wl,--output-def=libIntLib.def -Wl,--out-impl ...
+                            ~
Missing argument in parameter list.
At line:1 char:59
+ mingw32-gcc.exe -shared -Wl,--output-def=libIntLib.def -Wl,--out-impl ...
+                                                           ~
Missing argument in parameter list.
At line:1 char:88
+ ... ,--output-def=libIntLib.def -Wl,--out-implib,libIntLib.a -Wl,--dll  I ...
+                                                                 ~
Missing argument in parameter list.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingArgument

if i say exactly '-Wl' argument throws error and i can't get any .def or .a file for using in other projects. but it is questionable that Code::Blocks does this process with these codes very smoothly and successfully :\ any help with solving my problem is appreciated, thanks.

0

There are 0 best solutions below