Right jshanab, language problem is little bit there. In windows i wrote a .c file, when i run that .c files it opens the browser in URL http://localhost:8080 and display the html page that i wrote inside the .c file. I want the same in Mac also. Here i run the "make hello" an exec file is created inside the folder. But nothing happens. Is it is possible in mac ?
On Monday, 23 June 2014 17:07:46 UTC+5:30, jshanab wrote: > > another painful question. I think we are suffering a bit of language > barrier. The server can be started to listen on multiple ports. I > have dealt mostly with embedding so I will let sergy jump in on that > but if you just read a bit of the code you should see the command line > options. So if you look at hello.c you can easily see the line that > sets the port to 8080 > > Browsers load html pages from servers like mongoose. > You would add a port to the URL like http://localhost:8080 > > Do you mean load the C file as text? C is source code it CANNOT > opererate without being compiled into object code which is not human > readable. > > > On Mon, Jun 23, 2014 at 7:25 AM, Jijo Thomas <[email protected] > <javascript:>> wrote: > > Thanks jshanab. Now i can start the server as you said, problem is with > > server.c file. Is it is possible to open the port in 8080 as normal like > dmg > > installation? Is it is possible to open a browser with default 8080 port > and > > load the c file inside browser (if c file has some embedded html code). > > > > > > On Monday, 23 June 2014 16:42:45 UTC+5:30, jshanab wrote: > >> > >> I have a MAC handy so I just cloned, cd and ran make. No problem. > >> > >> paiste:examples jeffshanab$ make server > >> g++ server.c ../mongoose.c -o server -W -Wall -I.. -pthread -g -pipe > >> -lssl -g -O0 > >> clang: warning: treating 'c' input as 'c++' when in C++ mode, this > >> behavior is deprecated > >> clang: warning: treating 'c' input as 'c++' when in C++ mode, this > >> behavior is deprecated > >> paiste:examples jeffshanab$ > >> > >> On Mon, Jun 23, 2014 at 7:05 AM, Jijo Thomas <[email protected]> > wrote: > >> > Sorry Sergey.. i tried as you said, but i got this as response, i > don't > >> > know > >> > i to resolve this, thats why i am asking for help again and again. > >> > > >> > Mac-MacBook-Pro: examples myMac $ gcc hello.c > >> > Undefined symbols for architecture x86_64: > >> > "_mg_add_uri_handler", referenced from: > >> > _main in hello-f08c15.o > >> > "_mg_create_server", referenced from: > >> > _main in hello-f08c15.o > >> > "_mg_get_option", referenced from: > >> > _main in hello-f08c15.o > >> > "_mg_poll_server", referenced from: > >> > _main in hello-f08c15.o > >> > "_mg_printf_data", referenced from: > >> > _index_html in hello-f08c15.o > >> > "_mg_set_option", referenced from: > >> > _main in hello-f08c15.o > >> > ld: symbol(s) not found for architecture x86_64 > >> > clang: error: linker command failed with exit code 1 (use -v to see > >> > invocation) > >> > > >> > > >> > > >> > On Monday, 23 June 2014 16:29:52 UTC+5:30, Sergey Lyubka wrote: > >> >> > >> >> You were told exactly what to do to compile the example. Yet you > don't > >> >> think you need to do that and still asking for help. What kind of > >> >> answer do > >> >> you expect? > >> >> > >> >> On Jun 23, 2014 11:56 AM, "Jijo Thomas" <[email protected]> > wrote: > >> >>> > >> >>> Ok, can i run the files locally? Because i download all files from > >> >>> git. > >> >>> So i think i don't need to clone with the repository. First time i > >> >>> tired to > >> >>> compile using gcc compiler it shows error for mongoose.c file. Now > i > >> >>> fixed > >> >>> it by copying mongoose.c and mongoose.h to examples folder. then in > >> >>> terminal > >> >>> i tried to compile from examples folder its shows the above error. > Can > >> >>> you > >> >>> please explain in detail. Please... > >> >>> > >> >>> > >> >>> On Monday, 23 June 2014 16:19:21 UTC+5:30, Sergey Lyubka wrote: > >> >>>> > >> >>>> To build command line binary on Mac, clone the repo then > >> >>>> cd mongoose/examples > >> >>>> make server > >> >>>> > >> >>>> On Jun 23, 2014 11:40 AM, "jeff shanab" <[email protected]> > wrote: > >> >>>>> > >> >>>>> Could this possibly be an issue with building fat binaries? ie > you > >> >>>>> have it set to compile 32 but link for both. Usually this would > be > >> >>>>> very rare, but I don't know your environment. > >> >>>>> > >> >>>>> On Mon, Jun 23, 2014 at 6:37 AM, Jijo Thomas < > [email protected]> > >> >>>>> wrote: > >> >>>>> > Yes, i am trying to run mongoose server in my local machine. i > >> >>>>> > want > >> >>>>> > to load > >> >>>>> > the server without .dmg file. Thats why i use terminal. I > placed > >> >>>>> > mongoose.h, > >> >>>>> > mongoose.c and hello.c in the same folder. Now i am trying to > load > >> >>>>> > the > >> >>>>> > server, but fails. i don't know how to solve this. Please help > me. > >> >>>>> > > >> >>>>> > On Monday, 23 June 2014 16:02:18 UTC+5:30, Sergey Lyubka wrote: > >> >>>>> >> > >> >>>>> >> Make sure mongoose.c and hello.c are from the same repo > revision > >> >>>>> >> > >> >>>>> >> On Jun 23, 2014 11:26 AM, "Jijo Thomas" <[email protected]> > > >> >>>>> >> wrote: > >> >>>>> >>> > >> >>>>> >>> Yes, already added Mongoose.c file and mongoose.h file. Both > >> >>>>> >>> the > >> >>>>> >>> files > >> >>>>> >>> and hello.c are in the same folder. > >> >>>>> >>> > >> >>>>> >>> On Monday, 23 June 2014 14:03:46 UTC+5:30, Sergey Lyubka > wrote: > >> >>>>> >>>> > >> >>>>> >>>> You need to add mongoose.c to the compilation > >> >>>>> >>>> > >> >>>>> >>>> > >> >>>>> >>>> On Mon, Jun 23, 2014 at 9:15 AM, Jijo Thomas > >> >>>>> >>>> <[email protected]> > >> >>>>> >>>> wrote: > >> >>>>> >>>>> > >> >>>>> >>>>> I am new in Mongoose server. My doubt is how to run > mongoose > >> >>>>> >>>>> server in > >> >>>>> >>>>> my mac. I want to run it from terminal. i am trying to load > >> >>>>> >>>>> hello.c in the > >> >>>>> >>>>> example project that you have given with gcc compiler, but > >> >>>>> >>>>> fail > >> >>>>> >>>>> to run. > >> >>>>> >>>>> Please find the error that i get when i run "gcc hello.c" > in > >> >>>>> >>>>> terminal. > >> >>>>> >>>>> Please help me > >> >>>>> >>>>> > >> >>>>> >>>>> Undefined symbols for architecture x86_64: > >> >>>>> >>>>> "_mg_add_uri_handler", referenced from: > >> >>>>> >>>>> _main in hello-e35d38.o > >> >>>>> >>>>> "_mg_create_server", referenced from: > >> >>>>> >>>>> _main in hello-e35d38.o > >> >>>>> >>>>> "_mg_get_option", referenced from: > >> >>>>> >>>>> _main in hello-e35d38.o > >> >>>>> >>>>> "_mg_poll_server", referenced from: > >> >>>>> >>>>> _main in hello-e35d38.o > >> >>>>> >>>>> "_mg_printf_data", referenced from: > >> >>>>> >>>>> _index_html in hello-e35d38.o > >> >>>>> >>>>> "_mg_set_option", referenced from: > >> >>>>> >>>>> _main in hello-e35d38.o > >> >>>>> >>>>> ld: symbol(s) not found for architecture x86_64 > >> >>>>> >>>>> clang: error: linker command failed with exit code 1 (use > -v > >> >>>>> >>>>> to > >> >>>>> >>>>> see > >> >>>>> >>>>> invocation) > >> >>>>> >>>>> > >> >>>>> >>>>> -- > >> >>>>> >>>>> You received this message because you are subscribed to the > >> >>>>> >>>>> Google > >> >>>>> >>>>> Groups "mongoose-users" group. > >> >>>>> >>>>> To unsubscribe from this group and stop receiving emails > from > >> >>>>> >>>>> it, > >> >>>>> >>>>> send > >> >>>>> >>>>> an email to [email protected]. > >> >>>>> >>>>> To post to this group, send email to > >> >>>>> >>>>> [email protected]. > >> >>>>> >>>>> Visit this group at > >> >>>>> >>>>> http://groups.google.com/group/mongoose-users. > >> >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. > > >> >>>>> >>>> > >> >>>>> >>>> > >> >>>>> >>> -- > >> >>>>> >>> You received this message because you are subscribed to the > >> >>>>> >>> Google > >> >>>>> >>> Groups > >> >>>>> >>> "mongoose-users" group. > >> >>>>> >>> To unsubscribe from this group and stop receiving emails from > >> >>>>> >>> it, > >> >>>>> >>> send an > >> >>>>> >>> email to [email protected]. > >> >>>>> >>> To post to this group, send email to > >> >>>>> >>> [email protected]. > >> >>>>> >>> Visit this group at > >> >>>>> >>> http://groups.google.com/group/mongoose-users. > >> >>>>> >>> For more options, visit https://groups.google.com/d/optout. > >> >>>>> > > >> >>>>> > -- > >> >>>>> > You received this message because you are subscribed to the > Google > >> >>>>> > Groups > >> >>>>> > "mongoose-users" group. > >> >>>>> > To unsubscribe from this group and stop receiving emails from > it, > >> >>>>> > send an > >> >>>>> > email to [email protected]. > >> >>>>> > To post to this group, send email to > [email protected]. > >> >>>>> > Visit this group at > http://groups.google.com/group/mongoose-users. > >> >>>>> > For more options, visit https://groups.google.com/d/optout. > >> >>>>> > >> >>>>> -- > >> >>>>> You received this message because you are subscribed to the > Google > >> >>>>> Groups "mongoose-users" group. > >> >>>>> To unsubscribe from this group and stop receiving emails from it, > >> >>>>> send > >> >>>>> an email to [email protected]. > >> >>>>> To post to this group, send email to [email protected]. > > >> >>>>> Visit this group at http://groups.google.com/group/mongoose-users. > > >> >>>>> For more options, visit https://groups.google.com/d/optout. > >> >>> > >> >>> -- > >> >>> You received this message because you are subscribed to the Google > >> >>> Groups > >> >>> "mongoose-users" group. > >> >>> To unsubscribe from this group and stop receiving emails from it, > send > >> >>> an > >> >>> email to [email protected]. > >> >>> To post to this group, send email to [email protected]. > >> >>> Visit this group at http://groups.google.com/group/mongoose-users. > >> >>> For more options, visit https://groups.google.com/d/optout. > >> > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups > >> > "mongoose-users" group. > >> > To unsubscribe from this group and stop receiving emails from it, > send > >> > an > >> > email to [email protected]. > >> > To post to this group, send email to [email protected]. > >> > Visit this group at http://groups.google.com/group/mongoose-users. > >> > For more options, visit https://groups.google.com/d/optout. > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "mongoose-users" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to [email protected] <javascript:>. > > To post to this group, send email to [email protected] > <javascript:>. > > Visit this group at http://groups.google.com/group/mongoose-users. > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "mongoose-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mongoose-users. For more options, visit https://groups.google.com/d/optout.
