xforms-development
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] Xforms & threads-functions & others


From: Sergey Klimkin
Subject: Re: [XForms] Xforms & threads-functions & others
Date: Fri, 07 Oct 2011 23:00:57 +0400

Hi Jens,

>>1
Everything is very clear, I'll fix, thanks.
Multithreading is required for work with serial port, I see no other
solution.
After switching the data flow from the serial port can not access other
windows until it stopped the flow.
Functions to work with serial port in a separate file and do not cause
functions xforms.

>>2
Makefile:
# compiler
CC = gcc -Wall
# target "survey"
OUTPUT = survey

# create target file "survey"
(OUTPUT): survey_main.o survey.o survey_cb.o comport.o
        $(CC) survey_main.o survey.o survey_cb.o comport.o -o $(OUTPUT) -lforms

# create obj "survey_main.o"
survey_main.o: survey_main.c survey.h
        $(CC) -c survey_main.c -o survey_main.o
# create obj "survey.o"
survey.o: survey.c survey.h
        $(CC) -c survey.c -o survey.o
# create obj "survey_cb.o"
survey_cb.o: survey_cb.c survey.h
        $(CC) -c survey_cb.c -o survey_cb.o
# create obj "comport.o"
comport.o: comport.c survey.h
        $(CC) -c comport.c -o comport.o

clean:
        -rm *.o *~ -

In file survey_cb.c
void cb_btn1( FL_OBJECT * ob,
         long        data )
{
    /* Fill-in code for callback here */
        // Manually add 2 strings - for switch to form/window "FILES" from
"GNSS_MONITOR"
        fl_hide_form(fd_GNSS_MONITOR->GNSS_MONITOR);
        fl_show_form( fd_FILES->FILES, FL_PLACE_CENTERFREE, FL_FULLBORDER,
"FILES" );
}

... and so on cb_btn2() -- cb_btn6()

terminal:
address@hidden:~/projects/fdesign/surveyfd$ make
gcc -Wall -c survey_cb.c -o survey_cb.o
survey_cb.c: In function ‘cb_btn1’:
survey_cb.c:22: error: ‘fd_GNSS_MONITOR’ undeclared (first use in this
function)
survey_cb.c:22: error: (Each undeclared identifier is reported only once
survey_cb.c:22: error: for each function it appears in.)
survey_cb.c:23: error: ‘fd_FILES’ undeclared (first use in this
function)
survey_cb.c: In function ‘cb_btn2’:
survey_cb.c:34: error: ‘fd_GNSS_MONITOR’ undeclared (first use in this
function)
survey_cb.c:35: error: ‘fd_MODE’ undeclared (first use in this function)
survey_cb.c: In function ‘cb_btn3’:
survey_cb.c:46: error: ‘fd_GNSS_MONITOR’ undeclared (first use in this
function)
survey_cb.c:47: error: ‘fd_CONNECT’ undeclared (first use in this
function)
survey_cb.c: In function ‘cb_btn4’:
survey_cb.c:71: error: ‘fd_GNSS_MONITOR’ undeclared (first use in this
function)
survey_cb.c:72: error: ‘fd_SURVEYING’ undeclared (first use in this
function)
survey_cb.c: In function ‘cb_btn5’:
survey_cb.c:83: error: ‘fd_GNSS_MONITOR’ undeclared (first use in this
function)
survey_cb.c:84: error: ‘fd_MEASSUREMENT’ undeclared (first use in this
function)
survey_cb.c: In function ‘cb_btn6’:
survey_cb.c:95: error: ‘fd_GNSS_MONITOR’ undeclared (first use in this
function)
survey_cb.c:96: error: ‘fd_SKY’ undeclared (first use in this function)
make: *** [survey_cb.o] Ошибка 1
address@hidden:~/projects/fdesign/surveyfd$ 

Declarations fd_XXXXXX (FD_GNSS_MONITOR *fd_GNSS_MONITOR;) are in
survey_main.c
in main()  - they need to move in survey.h as: static FD_GNSS_MONITOR
*fd_GNSS_MONITOR;
otherwise they are invisible to the call from any location. 
Since I've already figured out.

>>3
The file exists and the right to read it is. Error in fd-Xforms:
Objects->Attributes->Spec->button_Browse
writes the truncated pathy /projects/fdesign/surveyfd/2Garmin_iPAQ.xpm
but even the full
path /home/sklimkin/projects/fdesign/surveyfd/2Garmin_iPAQ.xpm 
will be useless when you transfer the program to another machine
In the file survey.c in the function create_form_GNSS_MONITOR () is a
line that does not work:
fl_set_pixmap_file( obj, "projects/fdesign/surveyfd/2Garmin_iPAQ.xpm" );
In xforms I found a function that works: (buffer*, buf_size)
I get the full path to the file, join with him a file name, but the
picture does not load the program.
I've just made it in GIMP and saved me in the right place with the right
permissions.
I do not know what else to write about it.

>>4
I meant to attach to my e-mail message file with source code, or
archive-file ZIP-format with an image copy of the screen (as is now
common at many conferences Internet).
Here are just now found at the bottom of my Meassage image attached to
it!
So you can send Attachment?

With respect and gratitude for your patience,
Sergei Klimkin.

Attachment: surveyfd_2_projects.zip
Description: Zip archive


reply via email to

[Prev in Thread] Current Thread [Next in Thread]