Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling on Windows #7

Open
tgrosst opened this issue Feb 3, 2011 · 16 comments
Open

Compiling on Windows #7

tgrosst opened this issue Feb 3, 2011 · 16 comments

Comments

@tgrosst
Copy link

tgrosst commented Feb 3, 2011

I have been reading all the posts on this project and i haven't found any information on how to compile on Windows. Do you have to use something like Cygwin? Any help is appreciated. Thanks.

@Harvie
Copy link
Owner

Harvie commented Feb 3, 2011

I am bit afraid that code is not 100% ready for windows (as i have no windows machine to test it - commits are welcome). You can find where the problems are in C code comments.

Also i don't know how to build it on windows :-) But you don't need cygwin (well if you manage to build this plugin using pidgin, i guess that you will not have to modify the code at all and you can build it using supplied makefile as it is as long as you have all dependencies = libpurple headers)
Anyway... i've used standard pidgin plugin skeleton when i was writing it, so if you will manage to build any other plugin, you will manage to build this one too (with exception of problems highlighted in code)

@Harvie
Copy link
Owner

Harvie commented Feb 3, 2011

And well... you will probably also need to write your own answerscript for windows (if you don'T have BASH). BTW If you like scripting things give Linux a chance :-) Windows are for clickerz.

@tgrosst
Copy link
Author

tgrosst commented Feb 3, 2011

I've been reading some of the compiling instructions for windows on the pidgin website. I'll try to compile it, and see what happens. I'll probably try it out in linux in a virtual machine too. Thanks for the info.

@Harvie
Copy link
Owner

Harvie commented Feb 3, 2011

BTW you should uncomment this line: #define WIN32
and let me know what happens, thx :-)

@Harvie
Copy link
Owner

Harvie commented Feb 3, 2011

I've looked at the code and there are few differences
1.) answerscript should have .exe file extension
2.) scripts will probably be executed synchronously (so pidgin will remain freezed until answerscript will exit)

@ifrancis
Copy link

hey tcodeman, just wondering if you've had any joy compiling this for windows yet? This functionality would be great for a project I'm running right now but I'm a total noob when it comes to compiling dll's etc, any pointers would be appreciated. Ta.

@Harvie
Copy link
Owner

Harvie commented Feb 22, 2011

i am looking forward for your windoze-compatibility commits ;-)

@mickcy
Copy link

mickcy commented Feb 22, 2011

Ironically I myself have used this before on Ubuntu, but am stuck on Windows for the moment(intend to switch to Gentoo, but I'm waiting till I have 2 weeks of free time minimum in case something go goes wrong because of my silliness).

I'll give it a go on Windows XP and see if I can get it to work :)

@tgrosst
Copy link
Author

tgrosst commented Feb 22, 2011

I kinda stopped working on this for a while to do some other stuff. I have set up the dev environment and compiled pidgin. I am gonna try to get the plugin compiled soon.

@tgrosst
Copy link
Author

tgrosst commented Feb 22, 2011

I tried compiling it, but it ended in an error. This is my input:

$ make -f Makefile.mingw answerscripts.dll

and this is the output:

gcc.exe -O2 -Wall -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-fun
ction-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef -pipe -mno-cygwin -mms-bitfields -g -
DHAVE_CYRUS_SASL -DHAVE_CONFIG_H -DWIN32_LEAN_AND_MEAN -I../../../win32-dev/gtk_2_0-2.14/include -I.
./../../win32-dev/gtk_2_0-2.14/include/glib-2.0 -I../../../win32-dev/gtk_2_0-2.14/lib/glib-2.0/inclu
de -I../.. -I../../libpurple -I../../libpurple/win32 -o answerscripts.dll.o -c answerscripts.c
answerscripts.c:1:0: warning: "WIN32" redefined
:0:0: note: this is the location of the previous definition
answerscripts.c:41:5: warning: no previous prototype for 'answerscripts_process_message_cb'
answerscripts.c: In function 'answerscripts_process_message_cb':
answerscripts.c:44:2: warning: ISO C90 forbids mixed declarations and code
answerscripts.c:49:17: error: 'EWOULDBLOCK' undeclared (first use in this function)
answerscripts.c:49:17: note: each undeclared identifier is reported only once for each function it a
ppears in
answerscripts.c: In function 'received_im_msg_cb':
answerscripts.c:64:2: warning: ISO C90 forbids mixed declarations and code
answerscripts.c:87:2: warning: ISO C90 forbids mixed declarations and code
answerscripts.c:94:2: warning: ISO C90 forbids mixed declarations and code
answerscripts.c:102:2: warning: ISO C90 forbids mixed declarations and code
answerscripts.c:106:3: error: implicit declaration of function 'purple_savedstatus_get_message'
answerscripts.c:106:3: warning: nested extern declaration of 'purple_savedstatus_get_message'
answerscripts.c:106:3: error: implicit declaration of function 'purple_savedstatus_get_current'
answerscripts.c:106:3: warning: nested extern declaration of 'purple_savedstatus_get_current'
answerscripts.c:110:2: error: implicit declaration of function 'setenv'
answerscripts.c:110:2: warning: nested extern declaration of 'setenv'
answerscripts.c:118:2: warning: ISO C90 forbids mixed declarations and code
answerscripts.c: In function 'plugin_load':
answerscripts.c:137:2: error: implicit declaration of function 'asprintf'
answerscripts.c:137:2: warning: nested extern declaration of 'asprintf'
answerscripts.c:138:2: warning: ISO C90 forbids mixed declarations and code
make: *** [answerscripts.dll] Error 1

I am gonna look at the code later, but I did uncomment the #define WIN32 line mentioned above.
Let me know if you guys can glean any useful info from the output.

@Harvie
Copy link
Owner

Harvie commented Feb 22, 2011

answerscripts.c:1:0: warning: "WIN32" redefined

means that you don't need to uncomment the first line when using your compiler :-)

answerscripts.c:137:2: error: implicit declaration of function 'asprintf'

some missing header file

answerscripts.c:44:2: warning: ISO C90 forbids mixed declarations and code

too pedantic options pased to gcc :-)

answerscripts.c:49:17: error: 'EWOLDBLOCK' undeclared (first use in this function)

compiler reached the section of code which can't be compiled on windows and has to be ported :-D (or you can try to compile plugin using cygwin :-)

@Harvie
Copy link
Owner

Harvie commented Jun 11, 2011

BTW how are you compiling it? I've tried some Pidgin BEF (build environment fetcher - google it) script that probably could download everything needed using cygwin. (but it think it does not build using cygwin, but i've not even started the build - my windows freezed, and i haven't any motivation to boot it again :-). anyway building using cygwin can be an option too until code is fixed...

@tgrosst
Copy link
Author

tgrosst commented Jul 12, 2011

I just used cygwin and all the dependencies listed on the pidgin website.
Haven't tried the BEF though, I just downloaded them manually. Haven't
really done much with this lately, as I haven't needed it.

@Harvie
Copy link
Owner

Harvie commented Aug 22, 2015

Any progress? I don't use windows, but i'd like to hear if somebody was successful with building :-)

@Harvie
Copy link
Owner

Harvie commented Nov 4, 2015

Try again pls, it builds bit better now on linux. maybe it will be better on windows too.

@TomTheDragon
Copy link

I really would like to use this plugin but i have problems to compile it on windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants